<!--<include file="Core_Extend::template('header')" />-->

<!--{:Core_Extend::validate()}-->

<!--{script}-->
function deleteGrouptopcategory(category_id,group_id){
	windsforceConfirm(Q.L('确实要永久删除选择项吗？','Common'),function(){
		Q.AjaxSend(Q.U('group://groupadmin/topiccategory_delete'),'cid='+category_id+'&gid='+group_id+'&ajax=1','',completeDelete);
	});
}

function completeDelete(data,status){
	if(status==1){
		setTimeout("window.location.replace(_SELF_);",1000);
	}
}

function updateGrouptopcategory(category_id,group_id){
	window.location.href=Q.U('group://groupadmin/updatetopiccategory?gid='+group_id+'&cid='+category_id);
}

checkForm('',
	{
		grouptopiccategory_sort: {
			digits: true
		},
		grouptopiccategory_name: {
			maxlength: 32
		}
	},
	{
		grouptopiccategory_sort: '<!--<lang package='Template'>-->帖子分类排序不能为空，且只能为数字<!--</lang>-->',
		grouptopiccategory_name: '<!--<lang package='Template'>-->帖子分类名字,最大长度为32个字符<!--</lang>-->'
	}
);
<!--{/script}-->

		<div class="container_12">
			<ul class="breadcrumb">
				<li><a href="<!--{:__APP__}-->" title="<!--<lang package='__COMMON_LANG__@Common'>-->主页<!--</lang>-->"><!--<lang package='__COMMON_LANG__@Common'>-->主页<!--</lang>--></a>&nbsp;<span class="divider">/</span>&nbsp;</li>
				<li><a href="<!--{:Q::U('group://public/index')}-->" title="<!--<lang package='Template'>-->小组<!--</lang>-->"><!--<lang package='Template'>-->小组<!--</lang>--></a>&nbsp;<span class="divider">/</span>&nbsp;</li>
				<li><a href="<!--{:Group_Extend::getGroupurl($arrGroup)}-->"><!--{$arrGroup.group_nikename}--></a>&nbsp;<span class="divider">/</span>&nbsp;</li>
				<li><!--<lang package='Template'>-->小组帖子分类设置<!--</lang>--></li>
			</ul>
		</div>

		<div class="container_12 container_box">
			<!--<include file="group+header" />-->
			<!--<include file="groupadmin+menu" />-->
			
			<div class="grid_12">
				<form action="<!--{:Q::U('group://groupadmin/topiccategory_add')}-->" method="post" id="groupAdd" class="form-horizontal validate" style="margin-top:20px;">
					<div class="control-group">
						<div class="controls">
							<p><!--{if !empty($arrGrouptopiccategorys)}-->
								<!--<foreach for=arrGrouptopiccategorys>-->
								<a href="javascript:void(0);" title="<!--<lang package='__COMMON_LANG__@Common'>-->删除<!--</lang>-->" onclick="deleteGrouptopcategory('<!--{$value['grouptopiccategory_id']}-->','<!--{$arrGroup['group_id']}-->');">x</a>&nbsp;
								<a href="javascript:void(0);" title="<!--<lang package='__COMMON_LANG__@Common'>-->编辑<!--</lang>-->" onclick="updateGrouptopcategory('<!--{$value['grouptopiccategory_id']}-->','<!--{$arrGroup['group_id']}-->');" class="common_tag" style="line-height:32px;"><!--{$value['grouptopiccategory_name']}-->&nbsp;(<!--{$value['grouptopiccategory_sort']}-->)</a>&nbsp;&nbsp;&nbsp;
								<!--</foreach>-->
								<!--{d*else}-->
								<!--<lang package='Template'>-->帖子没有发现任何分类记录<!--</lang>-->
								<!--{/if}-->
							</p>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="grouptopiccategory_sort"><!--<lang package='Template'>-->序号<!--</lang>--></label>
						<div class="controls">
							<input type="text" name="grouptopiccategory_sort" id="grouptopiccategory_sort" size="10" value="0" required/>
							<p class="input_tips"><!--<lang package='Template'>-->帖子分类序号，用于帖子分类排序<!--</lang>--></p>
							<p class="input_errortips"></p>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="grouptopiccategory_sort"><!--<lang package='Template'>-->帖子分类名字<!--</lang>--></label>
						<div class="controls">
							<input type="text" name="grouptopiccategory_name" id="grouptopiccategory_name" size="40" value="" required/>
							<p class="input_tips"><!--<lang package='Template'>-->帖子分类名字,最大长度为32个字符<!--</lang>--></p>
							<p class="input_errortips"></p>
						</div>
					</div>
					<div class="control-group">
						<div class="controls">
							<input type="hidden" name="gid" value="<!--{$arrGroup.group_id}-->">
							<button type="submit" class="btn"><!--<lang package='Template'>-->添加<!--</lang>--></button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>

<!--<include file="Core_Extend::template('footer')" />-->